<?php
$uax = $_SERVER['HTTP_USER_AGENT'];
htmlUA('<div id="sidebar">','<aside>');
?>
	<ul>
		<li id="searchbox"><?php get_search_form(); ?></li>
		<li id="socialmedia">
			<!-- AddThis Button BEGIN -->
				<div class="addthis_toolbox addthis_default_style ">
					<a class="addthis_button_preferred_1"></a>
					<a class="addthis_button_preferred_2"></a>
					<a class="addthis_button_preferred_3"></a>
					<a class="addthis_button_preferred_4"></a>
					<a class="addthis_button_preferred_5"></a>
					<a class="addthis_button_preferred_6"></a>
					<a class="addthis_button_preferred_7"></a>
					<a class="addthis_button_compact"></a>
				</div>
				<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
				<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=luo123qiu"></script>
			<!-- AddThis Button END -->
		</li>
<?php
  /**
  * only shown if widget sidebar not enabled
  */
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) :

    wp_list_bookmarks('title_after=&title_before=');
	  wp_list_categories('title_li=' . __('Categories'));
    ?>
    <li id="search">
      <form id="searchform" method="get" action="<?php bloginfo('home'); ?>">
	    <div>
		    <input type="text" name="s" id="s" size="15" /><br />
		    <input type="submit" value="<?php _e('Search'); ?>" />
	    </div>
	    </form>
    </li>

    <li id="archives"><?php _e('Archives:'); ?>
	    <ul><?php wp_get_archives('type=monthly'); ?></ul>
    </li>

   <li id="meta"><?php _e('Meta:'); ?>
	  <ul>
		  <?php wp_register(); ?>
		  <li><?php wp_loginout(); ?></li>
		  <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
		  <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
		  <li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li>
		  <li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
		  <li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.'); ?>"><abbr title="WordPress">WP</abbr></a></li>
		  <?php wp_meta(); ?>
	  </ul>
   </li>
<?php endif; ?>

</ul>
<?php htmlUA('</div>','</aside>'); ?>
<br class="clr" />